/**
 * Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 * Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved.
 * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://opensource.org/licenses/MIT
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations under the License.
 */

@import '../../css/variable.css';
@import '../../css/mixins/ellipsis.css';
@import '../../css/mixins/clearfix.css';

.biz-content-wrapper {
    min-height: 580px;
}

.biz-cluster-node-title {
    display: inline-block;
    height: 60px;
    line-height: 60px;
    font-size: 16px;
    margin-left: 20px;
    cursor: pointer;

    .back {
        font-size: 16px;
        font-weight: 700;
        position: relative;
        top: 1px;
        cursor: pointer;
        color: $iconPrimaryColor;
    }
}

.biz-cluster-info-inner {
    background-color: $bgHoverColor;
    border: 1px solid $borderWeightColor;
    border-radius: 2px;
}

.biz-cluster-tab-header {
    height: 60px;
    line-height: 60px;
    font-size: 0;
    border-bottom: 1px solid $borderWeightColor;

    .header-item {
        font-size: 14px;
        display: inline-block;
        width: 140px;
        text-align: center;
        border: none;
        cursor: pointer;

        i {
            font-size: 16px;
            margin-right: 8px;
        }

        &.active {
            color: $iconPrimaryColor;
            background-color: #fff;
            border-right: 1px solid $borderWeightColor;
            border-left: 1px solid $borderWeightColor;
            font-weight: 700;
            cursor: default;
        }
    }
}

.biz-cluster-tab-content {
    padding-top: 20px;
    background-color: #fff;
}

.biz-cluster-info-form-wrapper {
    padding: 5px 26px 50px 26px;

    .label {
        color: #333948;
        font-size: 18px;
        margin-bottom: 20px;
    }

    .content {
        border: 1px solid $borderWeightColor;

        .row {
            min-height: 40px;
            line-height: 18px;
            display: flex;
            border-bottom: 1px solid $borderWeightColor;

            &:last-child {
                border-bottom: none;
            }

            .left {
                font-weight: 700;
                color: $fontWeightColor;
                font-size: 12px;
                width: 160px;
                border-right: 1px solid $borderWeightColor;
                text-align: right;
                padding: 0 20px;
                display: flex;
                align-items: center;

                >p {
                    width: 100%;
                }
            }

            .right {
                @mixin ellipsis 700px;
                color: $fontWeightColor;
                font-size: 12px;
                padding: 10px 20px;
                text-align: left;
            }
        }
    }
}

.biz-cluster-node-dialog {
    .biz-cluster-node-dialog-header {
        @mixin clearfix;
        background-color: #fff;
        border: 1px solid $borderWeightColor;
        border-left: none;
        border-right: none;
        height: 60px;
        line-height: 59px;
        font-size: 16px;
        padding: 0 20px;
        border-bottom: none;
        border-top-left-radius: 2px;
        border-top-right-radius: 2px;

        .left {
            float: left;

            .tip {
                font-size: 12px;
                margin-left: 10px;
                color: $fnMinorColor;
            }

            .remain-tip {
                font-size: 12px;
                margin-left: 10px;
                color: $dangerColor;
            }
        }

        .bk-dialog-tool {
            position: absolute;
            top: 0;
            right: 0;
        }
    }

    .biz-cluster-node-dialog-table {
        background-color: #fff;
        border: 1px solid $borderWeightColor;
        border-left: none;
        border-right: none;
        width: 920px;

        thead {
            background-color: $bgHoverColor;

            tr {
                th {
                    height: 40px;
                    padding-top: 0;
                    padding-bottom: 0;
                }
            }
        }

        tbody {
            tr {
                &:hover {
                    background-color: $bgHoverColor;
                }

                td {
                    height: 40px;
                    font-size: 12px;
                    padding-top: 0;
                    padding-bottom: 0;
                    position: relative;
                    top: 2px;
                }
            }
        }

        .no-data {
            min-height: 399px;

            .empty-message {
                margin-top: 160px;
            }
        }

        .name {
            @mixin ellipsis 120px;
        }

        .inner-ip {
            @mixin ellipsis 200px;
        }

        .idcunit {
            @mixin ellipsis 170px;
        }

        .server-rack {
            @mixin ellipsis 130px;
        }

        .device-class {
            @mixin ellipsis 80px;
        }
    }

    .biz-page-box {
        padding: 10px 25px 10px 0;
        background-color: $bgHoverColor;
        border-top: 1px solid $borderWeightColor;
        margin-top: -1px;
    }

    .bk-dialog-footer.bk-d-footer {
        background-color: #fff;
        display: none;
    }
}

.biz-cluster-set-variable-sideslider {
    margin: 0;
    padding: 0;
    z-index: 999;

    .wrapper {
        padding: 20px 40px 40px;
    }

    .flex-item {
        display: flex;

        .left,
        .right {
            flex: 1;
        }

        .right {
            margin-left: -30px;
        }
    }

    .biz-key-value-wrapper {
        .biz-key-value-item {
            position: relative;
            margin-bottom: 10px;

            input.right {
                margin-left: 35px;
            }

            .equals-sign {
                color: $fnMinorColor;
                position: absolute;
                top: 6px;
                display: inline-block;
                left: 284px;
            }
        }

        .bk-form-input {
            width: 270px;
        }

        .action-btn {
            width: auto;
            padding: 0;
            height: 36px;
            text-align: center;
            display: inline-block;
            border: none;
            background: transparent;
            outline: none;
            margin-left: 5px;

            .bk-icon {
                width: 24px;
                height: 24px;
                line-height: 24px;
                border-radius: 50%;
                vertical-align: middle;
                color: $fontWeightColor;
                font-size: 14px;
                display: inline-block;
                border: 1px solid $borderWeightColor;
            }
        }
    }

    .set-label-form {
        .bk-tooltip-inner {
            max-width: 260px;
        }

        .bk-form-item+.bk-form-item {
            margin-top: 5px;
        }

        .label {
            color: $fontWeightColor;
            font-size: 14px;
            font-weight: 700;
        }

        .action-inner {
            margin-top: 30px;

            button {
                width: 90px;
            }

            button+button {
                margin-left: 0;
            }
        }

        .bk-form-input {
            @mixin ellipsis 270px;
        }
    }

    button.disabled {
        background-color: #fafafa;
        border-color: $borderLightColor;
        color: #ccc;
        cursor: not-allowed;

        &:hover {
            background-color: #fafafa;
            border-color: $borderLightColor;
        }
    }
}
